home *** CD-ROM | disk | FTP | other *** search
- import java.awt.Graphics;
- import java.awt.Rectangle;
-
- public final class DrawEng implements Runnable {
- public ColadaDoc m_theDoc;
- public Colada m_appComp;
- public Rectangle clipRect;
- public boolean inDrawAll;
- private boolean startDrawAll;
- private boolean stopWhile;
-
- public void DoDrawAll(Rectangle var1) {
- if (this.inDrawAll && this.clipRect != null) {
- this.clipRect.union(var1);
- } else {
- this.clipRect = new Rectangle(var1.x, var1.y, var1.width, var1.height);
- }
-
- this.startDrawAll = true;
- }
-
- DrawEng(Colada var1, ColadaDoc var2) {
- this.m_theDoc = var2;
- this.m_appComp = var1;
- }
-
- public void whileLoop() {
- while(true) {
- if (!this.m_appComp.m_stopCalled) {
- try {
- Thread.sleep(20L);
- } catch (InterruptedException var1) {
- }
-
- if (!this.stopWhile) {
- if (!this.stopWhile && this.m_appComp.m_colDocDone && !this.m_appComp.m_stopCalled) {
- this.m_appComp.CallMediaObjects();
- }
-
- if (!this.stopWhile && this.startDrawAll) {
- this.startDrawAll = false;
- this.inDrawAll = true;
- this.drawAll();
- this.inDrawAll = false;
- continue;
- }
-
- this.m_appComp.m_breakDrawAll = false;
- this.inDrawAll = false;
- continue;
- }
-
- this.stopWhile = false;
- }
-
- this.m_appComp.m_drawEngThread = null;
- return;
- }
- }
-
- public void StopWhile() {
- this.stopWhile = true;
- }
-
- public void drawAll() {
- Graphics var1 = this.m_appComp.getGraphics();
- if (this.clipRect != null) {
- var1.clipRect(this.clipRect.x, this.clipRect.y, this.clipRect.width, this.clipRect.height);
- }
-
- this.m_theDoc.m_colGraphicObj.drawAll(var1);
- this.clipRect = null;
- }
-
- public void run() {
- this.whileLoop();
- }
- }
-